Commands
A command is a word or series of words used in AppleScript statements to request an action. Every command is directed at a target, which is the object that responds to the command. The target is usually an application object, but it can also be a script object or a user-defined subroutine or value in the current script.
Not all commands can be used with all types of targets. When you use a command to request an action, you must choose a command that works with the target you want to manipulate. You must also be sure to specify the target correctly. Several factors, including the direct parameter you provide with a command and whether or not the command is included in a Tell statement, can determine the target of a command.
Commands are described in the following sections:
-
Types of Commands
describes the types of commands you use with AppleScript. It also discusses targets of commands and summarizes which types of commands work with which types of targets.
-
Using Command Definitions
describes the details of using commands and command definitions.
-
Using Parameters
describes how to coerce parameters, how to use parameters that specify locations, and how to deal with raw data in parameters.
-
Using Results
describes how to view the result values generated by AppleScript commands and how to use the predefined result variable.
-
Double Angle Brackets in Results and Scripts
explains what it means when you see double angle brackets («») in a script or a result.
-
Command Definitions
provides detailed descriptions of the five AppleScript commands and of many standard application commands.
© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)